package com.study.web.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**  
 * All rights Reserved, Designed By yaojinshan
 * @Title:  DynamicDataSource.java   
 * @Package com.study.web   
 * @Description:    TODO   
 * @author: yaojinshan     
 * @date:   2018年7月17日 下午1:22:01   
 * @version V1.0 
 * @Copyright: 2018 All users All rights reserved. 
 * 注意：注意：本内容仅限于学习springmvc + spring + maven + mybatis学习使用 
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		 return DatabaseContextHolder.getCustomerType();
	}

}
